package com.fs.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author hyy
 * @version 1.0
 * @description: 营业额模型
 * @date 2024/10/24 15:19
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Business {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer stoProId;
    private Integer stoType;
    private Double totalMoney;
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date;

    public Business(Integer stoProId, Integer stoType, Double totalMoney, Date date) {
        this.stoProId = stoProId;
        this.stoType = stoType;
        this.totalMoney = totalMoney;
        this.date = date;
    }
}
